package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.LikeFlag;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 无空间 有应用
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_framework_userinfo")  //1-2-02个人资料表
public class Userinfo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 密保问题
     */
    @TableField(value = "my_pwd_problem")
    @Schema(description = "密保问题")
    private String myPwdProblem;
    /**
     * 密保答案
     */
    @TableField(value = "my_pwd_answer")
    @Schema(description = "密保答案")
    private String myPwdAnswer;
    /**
     * 个人资料记录ID
     */
    @TableId(value = "personal_data_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "personalDataId不能为空")
    private String personalDataId;
    /**
     * 账号
     */
    @TableField(value = "user_id")
    @NotNull(message = "账号不能为空")
    @Schema(description = "账号")
    private String userId;
    /**
     * 备注首位字母
     */
    @TableField(value = "first_letter")
    @NotNull(message = "备注首位字母不能为空")
    @Schema(description = "备注首位字母")
    private String firstLetter;
    /**
     * 真实姓名
     */
    @TableField(value = "id_card_name")
    @NotNull(message = "真实姓名不能为空")
    @Schema(description = "真实姓名")
    @LikeFlag(likeType = "LIKE")
    private String idCardName;
    /**
     * 用户昵称
     */
    @TableField(value = "nick_name")
    @Schema(description = "用户昵称")
    private String nickName;
    /**
     * 真实头像
     */
    @TableField(value = "user_face")
    @NotNull(message = "真实头像不能为空")
    @Schema(description = "真实头像")
    private String userFace;
    /**
     * 个人简介
     */
    @TableField(value = "user_intro")
    @Schema(description = "个人简介")
    private String userIntro;
    /**
     * 用户性别 MALE:男 FEMALE:女
     */
    @TableField(value = "sex")
    @Schema(description = "用户性别")
    private String sex;
    /**
     * 出生日期
     */
    @TableField(value = "birthday")
    @Schema(description = "出生日期")
    private Date birthday;
    /**
     * 用户城市
     */
    @TableField(value = "city")
    @Schema(description = "用户城市")
    private String city;
    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;
    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;
    /**
     * 归属应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "归属应用ID不能为空")
    @Schema(description = "归属应用ID")
    private String appId;
    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;
}
